package com.xyrx.xyrxcamundademo.controller;

import com.xyrx.xyrxcamundademo.camunda.PscCommonProcessRequest;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.camunda.bpm.engine.rest.dto.task.TaskDto;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @author JsDeng
 * @date 2020/5/28
 */

@RestController
@RequestMapping("/simpleProcessHandler")
public interface SimpleProcessHandler {

    @ApiOperation(value = "流程初始化", notes = "流程初始化")
    @RequestMapping(value = "/simpleInitProcess", method = RequestMethod.POST)
    public List<TaskDto> simpleInitProcess(HttpServletRequest request) throws Exception;



    @ApiOperation(value = "流程跟踪", notes = "获取流程跟踪图Url，根据流程实例Id和当前用户Id获取流程跟踪图Url")
    @RequestMapping(value = "/simpleGetProcessDiagramUrl/{processInstId}/{uid}", method = RequestMethod.GET)
    /**
     * @param processInstId
     * @param request is str
     * @param uid is str
     * @param Exception is null
     */
    public String simpleGetProcessDiagramUrl(@ApiParam(name = "processInstId", value = "流程实例Id", required = true) @PathVariable String processInstId, @ApiParam(name = "uid", value = "用户Id", required = true) @PathVariable String uid, HttpServletRequest request) throws Exception;
}
